<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <span v-if="isUserNameLogin">用户账号：
            <input type="text" placeholder="用户账号">
        </span>
        <span v-else>用户邮箱：
            <input type="text" placeholder="用户邮箱">
        </span>
        <button @click="isUserNameLogin=!isUserNameLogin">切换类型</button>

    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: '我是你爹!',
                isUserNameLogin: true,
            },
            methods: {
                btnClick() {}
            }
        });
    </script>
</body>

</html>